]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
cleanup: Remove erroneous vfunc parameters
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 31 Jan 2019 21:07:38 +0000 (22:07 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Tue, 5 Feb 2019 02:21:40 +0000 (02:21 +0000)
Unlike in C or signal handlers, vfuncs don't include the this-object
in their arguments.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/388

HACKING.md
js/ui/dateMenu.js
js/ui/edgeDragAction.js
js/ui/magnifier.js
js/ui/panel.js
js/ui/viewSelector.js
js/ui/windowManager.js

index d8d940d04d9c798abca37b4af88bfa01bccf1ad4..f1b3d3765cea41ff06b72de9957f8f28427b6e6b 100644 (file)
@@ -158,15 +158,15 @@ you to inherit from a type to use it, you can do so:
     var MyClutterActor = GObject.registerClass(
     class MyClutterActor extends Clutter.Actor {
 
-        vfunc_get_preferred_width(actor, forHeight) {
+        vfunc_get_preferred_width(forHeight) {
              return [100, 100];
         }
 
-        vfunc_get_preferred_height(actor, forWidth) {
+        vfunc_get_preferred_height(forWidth) {
              return [100, 100];
         }
 
-        vfunc_paint(actor) {
+        vfunc_paint() {
              let alloc = this.get_allocation_box();
              Cogl.set_source_color4ub(255, 0, 0, 255);
              Cogl.rectangle(alloc.x1, alloc.y1,
index 5d693896057fab233529532ca771cf3f47af1299..a04efb2f3af4a1b61c3d84bac37a6483badae2ec 100644 (file)
@@ -377,13 +377,13 @@ class IndicatorPad extends St.Widget {
         super._init();
     }
 
-    vfunc_get_preferred_width(container, forHeight) {
+    vfunc_get_preferred_width(forHeight) {
         if (this._source.visible)
             return this._source.get_preferred_width(forHeight);
         return [0, 0];
     }
 
-    vfunc_get_preferred_height(container, forWidth) {
+    vfunc_get_preferred_height(forWidth) {
         if (this._source.visible)
             return this._source.get_preferred_height(forWidth);
         return [0, 0];
index ec94c1b42678611dc06f9b920930a91569af0572..0cad5da34e0058ecd95e3f6ed6fe1aeeca5f598a 100644 (file)
@@ -30,7 +30,7 @@ var EdgeDragAction = GObject.registerClass({
         return global.display.get_monitor_geometry(monitorIndex);
     }
 
-    vfunc_gesture_prepare(action, actor) {
+    vfunc_gesture_prepare(actor) {
         if (this.get_n_current_points() == 0)
             return false;
 
@@ -46,7 +46,7 @@ var EdgeDragAction = GObject.registerClass({
                 (this._side == St.Side.BOTTOM && y > monitorRect.y + monitorRect.height - EDGE_THRESHOLD));
     }
 
-    vfunc_gesture_progress(action, actor) {
+    vfunc_gesture_progress(actor) {
         let [startX, startY] = this.get_press_coords(0);
         let [x, y] = this.get_motion_coords(0);
         let offsetX = Math.abs (x - startX);
@@ -66,7 +66,7 @@ var EdgeDragAction = GObject.registerClass({
         return true;
     }
 
-    vfunc_gesture_end(action, actor) {
+    vfunc_gesture_end(actor) {
         let [startX, startY] = this.get_press_coords(0);
         let [x, y] = this.get_motion_coords(0);
         let monitorRect = this._getMonitorRect(startX, startY);
index 0b480f1178c00c5773556a29acf5750bb065d2e5..b33c300c6cfbd02fb795b21a1d9378794b5ef4ce 100644 (file)
@@ -62,14 +62,14 @@ var MouseSpriteContent = GObject.registerClass({
         this._texture = null;
     }
 
-    vfunc_get_preferred_size(content) {
+    vfunc_get_preferred_size() {
         if (!this._texture)
             return [0, 0];
 
         return [this._texture.get_width(), this._texture.get_height()];
     }
 
-    vfunc_paint_content(content, actor, node) {
+    vfunc_paint_content(actor, node) {
         if (!this._texture)
             return;
 
index 9b264d9b016fbc585076ea214a1b446fa2039b7a..9c1954841dbb72ce89f47b3d7b78838715a3c9c6 100644 (file)
@@ -835,7 +835,7 @@ class Panel extends St.Widget {
         this._updateSolidStyle();
     }
 
-    vfunc_get_preferred_width(actor, forHeight) {
+    vfunc_get_preferred_width(forHeight) {
         let primaryMonitor = Main.layoutManager.primaryMonitor;
 
         if (primaryMonitor)
index f19d67b12dac54be659da49adf1925b6bbfb9182..3f690982fa3f6e3fe55f2173ac07cb1f667aaa55 100644 (file)
@@ -81,7 +81,7 @@ var ShowOverviewAction = GObject.registerClass({
         });
     }
 
-    vfunc_gesture_prepare(action, actor) {
+    vfunc_gesture_prepare(actor) {
         return Main.actionMode == Shell.ActionMode.NORMAL &&
                this.get_n_current_points() == this.get_n_touch_points();
     }
@@ -115,12 +115,12 @@ var ShowOverviewAction = GObject.registerClass({
                                     height: maxY - minY });
     }
 
-    vfunc_gesture_begin(action, actor) {
+    vfunc_gesture_begin(actor) {
         this._initialRect = this._getBoundingRect(false);
         return true;
     }
 
-    vfunc_gesture_end(action, actor) {
+    vfunc_gesture_end(actor) {
         let rect = this._getBoundingRect(true);
         let oldArea = this._initialRect.width * this._initialRect.height;
         let newArea = rect.width * rect.height;
index 8c4cb36d873f5ddd8f01c7a38a9f6a504536810f..2cb8dfb318a6f0bcefa9c0b3e801aef6cfe59a45 100644 (file)
@@ -599,7 +599,7 @@ var AppSwitchAction = GObject.registerClass({
         });
     }
 
-    vfunc_gesture_prepare(action, actor) {
+    vfunc_gesture_prepare(actor) {
         if (Main.actionMode != Shell.ActionMode.NORMAL) {
             this.cancel();
             return false;
@@ -608,7 +608,7 @@ var AppSwitchAction = GObject.registerClass({
         return this.get_n_current_points() <= 4;
     }
 
-    vfunc_gesture_begin(action, actor) {
+    vfunc_gesture_begin(actor) {
         // in milliseconds
         const LONG_PRESS_TIMEOUT = 250;
 
@@ -632,7 +632,7 @@ var AppSwitchAction = GObject.registerClass({
         return this.get_n_current_points() <= 4;
     }
 
-    vfunc_gesture_progress(action, actor) {
+    vfunc_gesture_progress(actor) {
         const MOTION_THRESHOLD = 30;
 
         if (this.get_n_current_points() == 3) {